require "lib/rcv"
reader = nil
# reader = RCV::ZipReader.new("test/test.zip")
# reader.read

# 30.times do
#   reader.get_next
# end

# 30.times do
#   reader.get_prev
# end

# RCV::Config.clear_bookmark
# 10.times do
#   reader.get_next
# end
# RCV::Config.bookmark = { "test/test.zip" => reader.state }
# 20.times do
#   reader.get_next
# end
# reader.load RCV::Config.bookmark("test/test.zip")
# 5.times do
#   reader.get_next
# end

require "benchmark"
files = []
Benchmark.bm(5) do |x|
  x.report("read") do
    reader = RCV::ZipReader.new("test/test2.zip")
    reader.read
  end

  x.report("next") do
    1000.times do
      reader.next_image
    end
  end

  x.report("prev") do
    1000.times do
      reader.prev_image
    end
  end
end
